//
//  NameInputView.m
//  ShangChengMoBan
//
//  Created by 张铁军 on 16/9/1.
//  Copyright © 2016年 ping. All rights reserved.
//

#import "NameInputView.h"

@implementation NameInputView{
    UIFont *_myFont;
}

-(instancetype)initWithFrame:(CGRect)frame andTextFont:(UIFont *)font{
    self = [super initWithFrame:frame];
    if (self) {
        _myFont = font;
        [self initView];
        
    }
    return self;
}

-(void)initView{
    self.backgroundColor = [UIColor whiteColor];
    _nameLabel = [[BaseLabel alloc]initWithFrame:CGRectMake(8,0 ,(self.width-16)/2.0 , self.height)];
    _nameLabel.font = _myFont;
    [self addSubview:_nameLabel];
    
    _inputTextfield = [[UITextField alloc]initWithFrame:CGRectMake(_nameLabel.right,0 , _nameLabel.width, _nameLabel.height)];
    _inputTextfield.placeholder = @"请输入";
    _inputTextfield.textAlignment = NSTextAlignmentRight;
    _inputTextfield.font = _myFont;
    [self addSubview:_inputTextfield];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
